//import angular core
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
//import mycomponents
import { ManageRoomComponent } from './manage-room.component';

import { RoomListComponent } from './room-list/room-list.component';
import { RoomDetailComponent } from './room-detail/room-detail.component';

import { FoodListComponent } from './food-list/food-list.component';
import { FoodDetailComponent } from './food-detail/food-detail.component';

import { RoomTypeListComponent } from './room-type-list/room-type-list.component';
import { RoomTypeDetailComponent } from './room-type-detail/room-type-detail.component';

const routes: Routes = [
    {
        path: '',
        component: ManageRoomComponent,
        children: [
            {
                path:'',
                component: RoomTypeListComponent
            },
            {
                path: 'room-type-list',
                component: RoomTypeListComponent
            },
            {
                path: 'room-type-detail/:id',
                component: RoomTypeDetailComponent
            },
            {
                path: 'room-list',
                component: RoomListComponent
            },
            {
                path: 'room-detail/:id',
                component: RoomDetailComponent
            },
            {
                path: 'food-list',
                component: FoodListComponent
            },
            {
                path: 'food-detail/:id',
                component: FoodDetailComponent
            },

        ]
    }
];

@NgModule({
    imports: [RouterModule.forChild(routes)],
    exports: [RouterModule]
})

export class ManageRoomRoutingModule {}